how to estimate the area under a curve